package com.etc.exam;

/**
 * @author: knowno
 * @create: 2024-09-09 14:15
 * @Version 1.0
 **/
public class Example {
    int a = 10; //实例变量,对象所有
    static int b = 20; //静态变量，类所有，所有实例共享

    public static void main(String[] args) {
        Example e1 = new Example();
        Example e2 = new Example();
        e1.a = 1;
        e1.b = 2;
        System.out.println(e1.a);
        System.out.println(e2.a);
        System.out.println(e2.b);
    }
}